<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class AlterXkClueChangeOwnerRecordFormatTime extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('xk_clue_change_owner_record', function (Blueprint $table) {
            $table->unsignedBigInteger("newOwnerId")->change();
            $table->unsignedBigInteger("operateWid")->change();
            $table->dateTime('formatCreatedAt')->nullable(true)->comment('kf - 创建时间')->after("createdAt");
            $table->unsignedInteger('updatedAt')->default(0)->comment('kf - 修改时间');
            $table->dateTime('formatUpdatedAt')->nullable(true)->comment('kf - 更新时间');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('xk_clue_change_owner_record', function (Blueprint $table) {
            $table->dropColumn(["formatCreatedAt", "updatedAt", "formatUpdatedAt"]);
        });
    }
}
